#include <iostream>
#include <memory>
#include <ctime>
#include "ThreadPool.hpp"
#include "Task.hpp"

int main()
{

    sleep(10);

    ThreadPool<Task>::GetInstance()->start();
    srand((uint64_t)time(nullptr) ^ getpid());

     while (true)
     {
         int x = rand() % 100 + 1;
         usleep(1234);
         int y = rand() % 200;
         usleep(1234);
         char oper = opers[rand() % opers.size()];

         Task t(x, y, oper);
         ThreadPool<Task>::GetInstance()->Push(t);

         sleep(1);
     }
    ThreadPool<Task>::GetInstance()->wait();

    return 0;
}